/*
 * CharacterPattern.h
 *
 *  Created on: 14.10.2012
 *      Author: caffeine
 */

#ifndef __CHARACTERPATTERN_H__
#define __CHARACTERPATTERN_H__

#include "CharacterPatternGroup.h"
#include <animation/IAnimation.h>
#include <xml/IFactoryEnvironment.h>
#include <IReferenceCounted.h>

class CharacterPattern:public virtual irr::IReferenceCounted{
public:
	static const int BodyElementType_COUNT=10;
	enum BodyElementType{
		FACIAL=0,HAIR,HAIR_HEAD,SKIN,FACE,BODY,FEET,HANDS,LAGS,ADD,
	};
private:
	/*
	CharacterPatternGroup*facial;//рисунки ростительности на лице
	CharacterPatternGroup*hair;//рисунки волос (те что на общей модели)
	CharacterPatternGroup*hair_head;//рисунок волос (тот что на голове)
	CharacterPatternGroup*skins;//виды кожи
	CharacterPatternGroup*face;//виды лица

	CharacterPatternGroup*bodys;//виды модели тела
	CharacterPatternGroup*lags;//виды модели тела
	CharacterPatternGroup*feet;//виды модель ног
	CharacterPatternGroup*hands;//виды модель рук
	CharacterPatternGroup*adds;//виды модель рук
	*/
	CharacterPatternGroup**groups;
	irr::animation::IAnimation*animation;



	irr::u32 id;
public:

	CharacterPattern();
	virtual ~CharacterPattern();
	void setAnimation(irr::core::stringc name);
	irr::animation::IAnimation*getAnimation();
	CharacterPatternGroup*getPatternGroup(BodyElementType type);
	CharacterPatternGroup*getFacial();
	CharacterPatternGroup*getHair();
	CharacterPatternGroup*getHair_head();
	CharacterPatternGroup*getskins();
	CharacterPatternGroup*getFace();
	CharacterPatternGroup*getBodys();
	CharacterPatternGroup*getFeet();
	CharacterPatternGroup*getHands();
	CharacterPatternGroup*getLags();
	CharacterPatternGroup*getAdds();

	CharacterPatternGroup*getGroups(BodyElementType type);

	irr::u32 getID();

	static void regFactory(irr::xml::IFactoryEnvironment*environment);
	static bool addPattern(CharacterPattern*pattern,irr::u32 ID);
	static CharacterPattern*getPatternByID(irr::u32 ID);
};

#endif /* CHARACTERPATTERN_H_ */
